<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<title>网站后台管理模版</title>
<link rel="stylesheet" type="text/css"
	href="../../static/admin/layui/css/layui.css" />
<link rel="stylesheet" type="text/css"
	href="../../static/admin/css/admin.css" />
</head>
<body>
	<div class="wrap-container">
		<form class="layui-form" style="width: 90%; padding-top: 20px;">
			<div class="layui-form-item">
				<label class="layui-form-label">类别：</label>
				<div class="layui-input-block">
					<select name="category" lay-verify="required">
						<option value=""></option>
						<option value="0">HTML模板</option>
						<option value="1">CSS特效</option>
						<option value="2">jQuery代码</option>
					</select>
				</div>

			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">资源名称：</label>
				<div class="layui-input-block">
					<input type="text" name="title" required lay-verify="required"
						placeholder="请输入名称" autocomplete="off" class="layui-input">
				</div>

			</div>

			<div class="layui-form-item">
				<label class="layui-form-label">上传资源：</label>
				<div class="layui-input-block">
					<input type="file" name="title" required lay-verify="required"
						autocomplete="off" class="layui-input">
				</div>

			</div>
			<div class="layui-form-item layui-form-text">
				<label class="layui-form-label">资源描述</label>
				<div class="layui-input-block">
					<textarea name="desc" placeholder="请输入内容" class="layui-textarea"></textarea>
				</div>
			</div>

			<div class="layui-form-item">
				<div class="layui-input-block">
					<button class="layui-btn layui-btn-normal" lay-submit
						lay-filter="formDemo">立即提交</button>
					<button type="reset" class="layui-btn layui-btn-primary">重置</button>
				</div>
			</div>
		</form>
	</div>

	<script src="../../static/admin/layui/layui.js" type="text/javascript"
		charset="utf-8"></script>
	<script>
			//Demo
			layui.use(['form'], function() {
				var form = layui.form();
				form.render();
				//监听提交
				form.on('submit(formDemo)', function(data) {
					layer.msg(JSON.stringify(data.field));
					return false;
				});
			});
		</script>
</body>

</html>